const axios = require('axios');

export const fetchData = (fn) => {
  axios.get('http://localhost:3000/test').then((res) => {
    fn(res.data);
  })
}

export const fetchDataPromise = () => {
  return axios.get('http://localhost:3000/test');
}

export const fetchDataPromiseError = () => {
  return axios.get('http://localhost:3000/test0');
}